package com.ylyq.ylxx.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName CreateAudiencePackageRequest
 * @Description TODO
 * @Author xiaweichao
 * @Date 2020/7/20 11:56
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "创建定向包的请求参数")
public class CreateAudiencePackageRequest {
    @ApiModelProperty(value = "广告主ID", required = true)
    private Long advertiser_id;
    @ApiModelProperty(value = "定向包名称", required = true)
    private String name;
    @ApiModelProperty(value = "定向包描述", required = true)
    private String description;
    @ApiModelProperty(value = "定向包类型【附录：定向包推广类型】", required = true)
    private String landing_type;

    @ApiModelProperty(value = "定向人群包列表，内容为人群包id")
    private Long[] retargeting_tags;
    @ApiModelProperty(value = "排除人群包列表，内容为人群包id")
    private Long[] retargeting_tags_exclude;

    @ApiModelProperty(value = "受众性别, 详见【附录-受众性别】允许值: GENDER_FEMALE,GENDER_MALE , NONE")
    private String gender;
    @ApiModelProperty(value = "受众年龄区间, 详见【附录-受众年龄区间】允许值: AGE_BETWEEN_18_23,AGE_BETWEEN_24_30,AGE_BETWEEN_31_40, AGE_BETWEEN_41_49,AGE_ABOVE_50")
    private String[] age;
    @ApiModelProperty(value = "受众最低android版本(当推广应用下载Android时选填,其余情况不填), 详见【附录-受众android版本】允许值: \"0.0\", \"2.0\", \"2.1\", \"2.2\", \"2.3\", \"3.0\", \"3.1\", \"3.2\", \"4.0\",\"4.1\",\"4.2\", \"4.3\", \"4.4\", \"4.5\", \"5.0\", \"NONE\"\n")
    private String android_osv;
    @ApiModelProperty(value = "受众最低ios版本(当推广应用下载iOS时选填,其余情况不填), 详见【附录-受众ios版本】允许值: \"0.0\", \"4.0\", \"4.1\", \"4.2\", \"4.3\", \"5.0\", \"5.1\", \"6.0\", \"7.0\",\"7.1\",\"8.0\", \"8.1\", \"8.2\", \"9.0\", \"NONE\"\n")
    private String ios_osv;
    @ApiModelProperty(value = "受众运营商, 详见【附录-受众运营商类型】允许值: \"MOBILE\", \"UNICOM\", \"TELCOM\"")
    private String[] carrier;
    @ApiModelProperty(value = "受众网络类型, 详见【附录-受众网络类型】")
    private String[] ac;
    @ApiModelProperty(value = "受众手机品牌, 详见【附录-手机品牌】")
    private String[] device_brand;
    @ApiModelProperty(value = "受众文章分类, 详见【附录-受众文章分类】")
    private String[] article_category;
    @ApiModelProperty(value = "用户首次激活时间, 详见【附录-用户首次激活时间】")
    private String[] activate_type;
    @ApiModelProperty(value = "受众平台(当推广目的landing_type=APP时,不填,且为保证投放效果,平台类型定向PC与移动端互斥)，android_osv或ios_osv非空时，必填。详见【附录-受众平台类型】")
    private String[] platform;
    @ApiModelProperty(value = "是否启动智能放量\n" +
            "    允许值：0表示关闭，1表示开启")
    private Integer auto_extend_enabled;
    @ApiModelProperty(value = "智能放量定向\n" +
            "    允许值：REGION（地域）,GENDER（性别）,AGE（年龄）,CUSTOM_AUDIENCE（自定义人群）")
    private String[] auto_extend_targets;
    @ApiModelProperty(value = "手机价格定向,传入价格区间，最高传入11000（表示1w以上）传值示例 \"launch_price\": [2000, 11000]，表示2000元以上")
    private Long[] launch_price;
    @ApiModelProperty(value = "行为兴趣选择\n" +
            "    允许值：UNLIMITED（不限）,CUSTOM（自定义）,RECOMMEND（系统推荐）")
    private String interest_action_mode;
    @ApiModelProperty(value = "行为场景，详见【附录-行为场景】，当interest_action_mode传CUSTOM时有效\n" +
            "    允许值：E-COMMERCE,NEWS, APP")
    private String[] action_scene;
    @ApiModelProperty(value = "行为天数,当interest_action_mode传CUSTOM时有效\n" +
            "    允许值：7, 15, 30, 60, 90, 180, 365P")
    private Integer action_days;
    @ApiModelProperty(value = "行为类目,当interest_action_mode传CUSTOM时有效")
    private Long[] action_categories;
    @ApiModelProperty(value = "行为关键词,当interest_action_mode传CUSTOM时有效")
    private Long[] action_words;
    @ApiModelProperty(value = "兴趣分类,如果传空数组 [] 表示不限，如果只传[0]表示系统推荐,如果按兴趣类型传表示自定义，通过“查询工具”-兴趣类目/兴趣关键词查询。当interest_action_mode传CUSTOM时有效")
    private Long[] interest_categories;
    @ApiModelProperty(value = "兴趣关键词, 传入具体的词id，非兴趣词包id，可以通过词包相关接口或者兴趣关键词word2id接口获取词id，一个计划下最多创建1000个关键词。当interest_action_mode传CUSTOM时有效")
    private Long[] interest_words;
    @ApiModelProperty(value = "地域定向城市或者区县列表(当传递省份ID时,旗下市县ID可省略不传), 详见【附件-city.json】")
    private Long[] city;
    @ApiModelProperty(value = "商圈ID数组")
    private Long[] business_ids;
    @ApiModelProperty(value = "地域类型，前者为省市，后者为区县。当city有数据时，必填。\n" +
            "    允许值: \"CITY\", \"COUNTY\", \"BUSINESS_DISTRICT\",\"NONE\"](https://ad.oceanengine.com/openapi/doc/index.html?id=528)")
    private String  district;
    @ApiModelProperty(value = "受众位置类型,当city和district有值时，该字段必填，详见【附录-受众位置类型】")
    private String  location_type;

    private GeolocationRequest[] geolocation;

    @ApiModelProperty(value = "（抖音推广特有）账号粉丝相似人群（添加抖音账号，会将广告投放给对应账号的相似人群粉丝）")
    private Long[] aweme_fans_numbers;
    @ApiModelProperty(value = "（抖音推广特有）过滤高活跃用户\n" +
            "    允许值：0:表示不过滤，1:表示过滤")
    private Long filter_aweme_abnormal_active;
    @ApiModelProperty(value = "（抖音推广特有）过滤高关注数用户，例如\"filter_aweme_fans_count\": 1000表示过滤粉丝数在1000以上的用户")
    private Long filter_aweme_fans_count;
    @ApiModelProperty(value = "（抖音推广特有）过滤自己的粉丝，允许值：0表示不过滤，1表示过滤")
    private Long filter_own_aweme_fans;
    @ApiModelProperty(value = "抖音号id，与aweme_fan_behaviors同时设置才会生效（抖音达人定向）")
    private Long[] aweme_fan_accounts;
    @ApiModelProperty(value = "抖音类目id，与aweme_fan_behaviors同时设置才会生效（抖音达人定向）")
    private Long[] aweme_fan_categories;
    @ApiModelProperty(value = "抖音用户行为类型, 详见【附录-抖音用户行为类型】\n" +
            "    允许值:\n" +
            "            \"FOLLOWED_USER\",\"COMMENTED_USER\",\"LIKED_USER\",\"SHARED_USER\"（抖音达人定向）")
    private String[] aweme_fan_behaviors;
    @ApiModelProperty(value = "过滤已安装，当推广目标为安卓应用下载时可填，0表示不过滤，1表示过滤，默认为不过滤\n" +
            "    默认值:0\n" +
            "    允许值: 0, 1")
    private Long hide_if_exists;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(value = "创建定向包的请求参数-地图位置")
    public static class GeolocationRequest {
        @ApiModelProperty(value = "省份名")
        private String province;
        @ApiModelProperty(value = "城市名")
        private String city;
        @ApiModelProperty(value = "地点名字")
        private String name;
        @ApiModelProperty(value = "经度")
        private Float long_;
        @ApiModelProperty(value = "纬度")
        private Float lat;
        @ApiModelProperty(value = "街道名")
        private String street;
        @ApiModelProperty(value = "街道号")
        private String street_number;
        @ApiModelProperty(value = "区域名")
        private String district;
        @ApiModelProperty(value = "半径范围")
        private Long radius;
    }
}
